<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Startup CAT1A</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__system__config__cm4.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">API Reference</a>  </div>
  <div class="headertitle">
<div class="title">Startup CAT1A<div class="ingroups"><a class="el" href="group__group__startup__config.html">Startup</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>Provides device startup, system configuration, and linker script files. </p>
<p>The system startup provides the followings features:</p><ul>
<li>See <a class="el" href="group__group__system__config__cm4.html#group_system_config_device_initialization">Device Initialization</a> for the:<ul>
<li><a class="el" href="group__group__system__config__cm4.html#group_system_config_dual_core_device_initialization">Dual-Core Devices</a></li>
<li><a class="el" href="group__group__system__config__cm4.html#group_system_config_single_core_device_initialization">Single-Core Devices</a></li>
</ul>
</li>
<li><a class="el" href="group__group__system__config__cm4.html#group_system_config_device_memory_definition">Device Memory Definition</a></li>
<li><a class="el" href="group__group__system__config__cm4.html#group_system_config_heap_stack_config">Heap and Stack Configuration</a></li>
<li><a class="el" href="group__group__system__config__cm4.html#group_system_config_default_handlers">Default Interrupt Handlers Definition</a></li>
<li><a class="el" href="group__group__system__config__cm4.html#group_system_config_device_vector_table">Vectors Table Copy from Flash to RAM</a></li>
<li><a class="el" href="group__group__system__config__cm4__functions.html">Cortex-M4 Control Functions</a></li>
</ul>
<h1><a class="anchor" id="group_system_config_configuration"></a>
Configuration Considerations</h1>
<h2><a class="anchor" id="group_system_config_device_memory_definition"></a>
Device Memory Definition</h2>
<p>The flash and RAM allocation for each CPU is defined by the linker scripts. For dual-core devices, the physical flash and RAM memory is shared between the CPU cores. 2 KB of RAM (allocated at the end of RAM) are reserved for system use. For Single-Core devices the system reserves additional 80 bytes of RAM. Using the reserved memory area for other purposes will lead to unexpected behavior.</p>
<dl class="section note"><dt>Note</dt><dd>The linker files provided with the PDL are generic and handle all common use cases. Your project may not use every section defined in the linker files. In that case you may see warnings during the build process. To eliminate build warnings in your project, you can simply comment out or remove the relevant code in the linker file.</dd>
<dd>
For the PSoC 64 Secure MCUs devices, refer to the following page: <a href="https://www.cypress.com/documentation/software-and-drivers/psoc-64-secure-mcu-secure-boot-sdk-user-guide">https://www.cypress.com/documentation/software-and-drivers/psoc-64-secure-mcu-secure-boot-sdk-user-guide</a></dd></dl>
<p><b>ARM GCC</b><br />
 The flash and RAM sections for the CPU are defined in the linker files: 'xx_yy.ld', where 'xx' is the device group, and 'yy' is the target CPU; for example, 'cy8c6xx7_cm0plus.ld' and 'cy8c6xx7_cm4_dual.ld'. </p><dl class="section note"><dt>Note</dt><dd>If the start of the Cortex-M4 application image is changed, the value of the <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> should also be changed. The <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> macro should be used as the parameter for the <a class="el" href="group__group__system__config__cm4__functions.html#gac44c12fdb0562403fc055e4e8966b557" title="Sets vector table base address and enables the Cortex-M4 core. ">Cy_SysEnableCM4()</a> function call. By default, the COMPONENT_CM0P_SLEEP prebuilt image is used for the CM0p core. More about CM0+ prebuilt images, see here: <a href="https://github.com/Infineon/psoc6cm0p">https://github.com/Infineon/psoc6cm0p</a></dd></dl>
<p>Change the flash and RAM sizes by editing the macros value in the linker files for both CPUs:</p><ul>
<li>'xx_cm0plus.ld', where 'xx' is the device group: <div class="fragment"><div class="line">flash       (rx)  : ORIGIN = 0x10000000, LENGTH = 0x2000</div><div class="line">ram         (rwx) : ORIGIN = 0x08000000, LENGTH = 0x2000</div></div><!-- fragment --></li>
<li>'xx_cm4_dual.ld', where 'xx' is the device group: <div class="fragment"><div class="line">flash       (rx)  : ORIGIN = 0x10000000, LENGTH = 0x100000</div><div class="line">ram         (rwx) : ORIGIN = 0x08002000, LENGTH = 0x45800</div></div><!-- fragment --></li>
</ul>
<p>Change the value of the <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> macro to the ROM ORIGIN's value (0x10000000) + FLASH_CM0P_SIZE value (0x2000, the size of a flash image of the Cortex-M0+ application should be the same value as the flash LENGTH in 'xx_cm0plus.ld') in the 'xx_cm4_dual.ld' file, where 'xx' is the device group. Do this by either:</p><ul>
<li>Passing the following commands to the compiler:<br />
<div class="fragment"><div class="line">-D <a class="code" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a>=0x10002000 </div></div><!-- fragment --> or</li>
<li>Editing the <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> value in the 'system_xx.h', where 'xx' is the device family:<br />
<div class="fragment"><div class="line"><span class="preprocessor">#define CY_CORTEX_M4_APPL_ADDR (0x10002000u) </span></div></div><!-- fragment --></li>
</ul>
<p><b>ARM Compiler</b><br />
 The flash and RAM sections for the CPU are defined in the linker files: 'xx_yy.sct', where 'xx' is the device group, and 'yy' is the target CPU; for example 'cy8c6xx7_cm0plus.sct' and 'cy8c6xx7_cm4_dual.sct'. </p><dl class="section note"><dt>Note</dt><dd>If the start of the Cortex-M4 application image is changed, the value of the of the <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> should also be changed. The <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> macro should be used as the parameter for the <a class="el" href="group__group__system__config__cm4__functions.html#gac44c12fdb0562403fc055e4e8966b557">Cy_SysEnableCM4()</a> function call. By default, the COMPONENT_CM0P_SLEEP prebuilt image is used for the CM0p core. More about CM0+ prebuilt images, see here: <a href="https://github.com/Infineon/psoc6cm0p">https://github.com/Infineon/psoc6cm0p</a></dd>
<dd>
The linker files provided with the PDL are generic and handle all common use cases. Your project may not use every section defined in the linker files. In that case you may see the warnings during the build process: L6314W (no section matches pattern) and/or L6329W (pattern only matches removed unused sections). In your project, you can suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to the linker. You can also comment out or remove the relevant code in the linker file.</dd></dl>
<p>Change the flash and RAM sizes by editing the macros value in the linker files for both CPUs:</p><ul>
<li>'xx_cm0plus.sct', where 'xx' is the device group: <div class="fragment"><div class="line"><span class="preprocessor">#define FLASH_START 0x10000000</span></div><div class="line"><span class="preprocessor">#define FLASH_SIZE  0x00002000</span></div><div class="line"><span class="preprocessor">#define RAM_START   0x08000000</span></div><div class="line"><span class="preprocessor">#define RAM_SIZE    0x00002000</span></div></div><!-- fragment --></li>
<li>'xx_cm4_dual.sct', where 'xx' is the device group: <div class="fragment"><div class="line"><span class="preprocessor">#define FLASH_START 0x10000000</span></div><div class="line"><span class="preprocessor">#define FLASH_SIZE  0x00100000</span></div><div class="line"><span class="preprocessor">#define RAM_START   0x08002000</span></div><div class="line"><span class="preprocessor">#define RAM_SIZE    0x00045800</span></div></div><!-- fragment --></li>
</ul>
<p>Change the value of the <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> macro to the FLASH_START value (0x10000000) + FLASH_CM0P_SIZE value (0x2000, the size of a flash image of the Cortex-M0+ application should be the same value as the FLASH_SIZE in the 'xx_cm0plus.sct') in the 'xx_cm4_dual.sct' file, where 'xx' is the device group. Do this by either:</p><ul>
<li>Passing the following commands to the compiler:<br />
<div class="fragment"><div class="line">-D CY_CORTEX_M4_APPL_ADDR=0x10002000 </div></div><!-- fragment --> or</li>
<li>Editing the <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> value in the 'system_xx.h', where 'xx' is the device family:<br />
<div class="fragment"><div class="line"><span class="preprocessor">#define CY_CORTEX_M4_APPL_ADDR (0x10002000u) </span></div></div><!-- fragment --></li>
</ul>
<p><b>IAR</b><br />
 The flash and RAM sections for the CPU are defined in the linker files: 'xx_yy.icf', where 'xx' is the device group, and 'yy' is the target CPU; for example, 'cy8c6xx7_cm0plus.icf' and 'cy8c6xx7_cm4_dual.icf'. </p><dl class="section note"><dt>Note</dt><dd>If the start of the Cortex-M4 application image is changed, the value of the of the <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> should also be changed. The <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> macro should be used as the parameter for the <a class="el" href="group__group__system__config__cm4__functions.html#gac44c12fdb0562403fc055e4e8966b557">Cy_SysEnableCM4()</a> function call. By default, the COMPONENT_CM0P_SLEEP prebuilt image is used for the CM0p core. More about CM0+ prebuilt images, see here: <a href="https://github.com/Infineon/psoc6cm0p">https://github.com/Infineon/psoc6cm0p</a></dd></dl>
<p>Change the flash and RAM sizes by editing the macros value in the linker files for both CPUs:</p><ul>
<li>'xx_cm0plus.icf', where 'xx' is the device group: <div class="fragment"><div class="line">define symbol __ICFEDIT_region_IROM1_start__ = 0x10000000;</div><div class="line">define symbol __ICFEDIT_region_IROM1_end__   = 0x10001FFF;</div><div class="line">define symbol __ICFEDIT_region_IRAM1_start__ = 0x08000000;</div><div class="line">define symbol __ICFEDIT_region_IRAM1_end__   = 0x08001FFF;</div></div><!-- fragment --></li>
<li>'xx_cm4_dual.icf', where 'xx' is the device group: <div class="fragment"><div class="line">define symbol __ICFEDIT_region_IROM1_start__ = 0x10000000;</div><div class="line">define symbol __ICFEDIT_region_IROM1_end__   = 0x100FFFFF;</div><div class="line">define symbol __ICFEDIT_region_IRAM1_start__ = 0x08002000;</div><div class="line">define symbol __ICFEDIT_region_IRAM1_end__   = 0x080477FF;</div></div><!-- fragment --></li>
</ul>
<p>Change the value of the <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> macro to the <b>ICFEDIT_region_IROM1_start</b> value (0x10000000) + FLASH_CM0P_SIZE value (0x2000, the size of a flash image of the Cortex-M0+ application) in the 'xx_cm4_dual.icf' file, where 'xx' is the device group. The sum result should be the same as (<b>ICFEDIT_region_IROM1_end</b> + 1) value in the 'xx_cm0plus.icf'. Do this by either:</p><ul>
<li>Passing the following commands to the compiler:<br />
<div class="fragment"><div class="line">-D CY_CORTEX_M4_APPL_ADDR=0x10002000 </div></div><!-- fragment --> or</li>
<li>Editing the <a class="el" href="group__group__system__config__user__settings__macro.html#ga54e255e631cab1db862ff92646e54c51">CY_CORTEX_M4_APPL_ADDR</a> value in the 'system_xx.h', where 'xx' is the device family:<br />
<div class="fragment"><div class="line"><span class="preprocessor">#define CY_CORTEX_M4_APPL_ADDR (0x10002000u) </span></div></div><!-- fragment --></li>
</ul>
<h2><a class="anchor" id="group_system_config_device_initialization"></a>
Device Initialization</h2>
<p>After a power-on-reset (POR), the boot process is handled by the boot code from the on-chip ROM that is always executed by the Cortex-M0+ core. The boot code passes the control to the Cortex-M0+ startup code located in flash.</p>
<h3><a class="anchor" id="group_system_config_dual_core_device_initialization"></a>
Dual-Core Devices</h3>
<p>The Cortex-M0+ startup code performs the device initialization by a call to <a class="el" href="group__group__startup__config__system__functions.html#ga93f514700ccf00d08dbdcff7f1224eb2" title="For CAT1A: ">SystemInit()</a> and then calls the main() function. The Cortex-M4 core is disabled by default. Enable the core using the <a class="el" href="group__group__system__config__cm4__functions.html#gac44c12fdb0562403fc055e4e8966b557">Cy_SysEnableCM4()</a> function. See <a class="el" href="group__group__system__config__cm4__functions.html">Cortex-M4 Control Functions</a> for more details. </p><dl class="section note"><dt>Note</dt><dd>Startup code executes <a class="el" href="group__group__startup__config__system__functions.html#ga93f514700ccf00d08dbdcff7f1224eb2" title="For CAT1A: ">SystemInit()</a> function for the both Cortex-M0+ and Cortex-M4 cores. The function has a separate implementation on each core. Both function implementations unlock and disable the WDT. Therefore enable the WDT after both cores have been initialized.</dd></dl>
<h3><a class="anchor" id="group_system_config_single_core_device_initialization"></a>
Single-Core Devices</h3>
<p>The Cortex-M0+ core is not user-accessible on these devices. In this case the Flash Boot handles setup of the CM0+ core and starts the Cortex-M4 core.</p>
<h2><a class="anchor" id="group_system_config_heap_stack_config"></a>
Heap and Stack Configuration</h2>
<p>There are two ways to adjust heap and stack configurations:</p><ol type="1">
<li>Editing source code files</li>
<li>Specifying via command line</li>
</ol>
<p>By default, the stack size is set to 0x00001000 and the heap size is allocated dynamically to the whole available free memory up to stack memory and it is set to the 0x00000400 (for ARM GCC and IAR compilers) as minimal value.</p>
<h3><a class="anchor" id="group_system_config_heap_stack_config_gcc"></a>
ARM GCC</h3>
<ul>
<li><b>Editing source code files</b><br />
 The heap and stack sizes are defined in the assembler startup files (e.g. startup_psoc6_01_cm0plus.S and startup_psoc6_01_cm4.S). Change the heap and stack sizes by modifying the following lines:<br />
<div class="fragment"><div class="line">.equ  Stack_Size, 0x00001000 </div></div><!-- fragment --> <div class="fragment"><div class="line">.equ  Heap_Size,  0x00000400 </div></div><!-- fragment --> Also, the stack size is defined in the linker script files: 'xx_yy.ld', where 'xx' is the device family, and 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.ld and cy8c6xx7_cm4_dual.ld. Change the stack size by modifying the following line:<br />
<div class="fragment"><div class="line">STACK_SIZE = 0x1000; </div></div><!-- fragment --></li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Correct operation of malloc and related functions depends on the working implementation of the 'sbrk' function. Newlib-nano (default C runtime library used by the GNU Arm Embedded toolchain) provides weak 'sbrk' implementation that doesn't check for heap and stack collisions during excessive memory allocations. To ensure the heap always remains within the range defined by __HeapBase and __HeapLimit linker symbols, provide a strong override for the 'sbrk' function: <div class="fragment"><div class="line"><span class="keywordtype">void</span> * _sbrk(uint32_t incr)</div><div class="line">{</div><div class="line">    <span class="keyword">extern</span> uint8_t __HeapBase, __HeapLimit;</div><div class="line">    <span class="keyword">static</span> uint8_t *heapBrk = &amp;__HeapBase;</div><div class="line">    uint8_t *prevBrk = heapBrk;</div><div class="line">    <span class="keywordflow">if</span> (incr &gt; (uint32_t)(&amp;__HeapLimit - heapBrk))</div><div class="line">    {</div><div class="line">        errno = ENOMEM;</div><div class="line">        <span class="keywordflow">return</span> (<span class="keywordtype">void</span> *)-1;</div><div class="line">    }</div><div class="line">    heapBrk += incr;</div><div class="line">    <span class="keywordflow">return</span> prevBrk;</div><div class="line">}</div></div><!-- fragment --> For FreeRTOS-enabled multi-threaded applications, it is sufficient to include clib-support library that provides newlib-compatible implementations of 'sbrk', '__malloc_lock' and '__malloc_unlock': <br />
 <a href="https://github.com/Infineon/clib-support">https://github.com/Infineon/clib-support</a>.</dd></dl>
<h3><a class="anchor" id="group_system_config_heap_stack_config_mdk"></a>
ARM Compiler</h3>
<ul>
<li><b>Editing source code files</b><br />
 The stack size is defined in the linker script files: 'xx_yy.sct', where 'xx' is the device family, and 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.sct and cy8c6xx7_cm4_dual.sct. Change the stack size by modifying the following line:<br />
<div class="fragment"><div class="line">STACK_SIZE = 0x1000; </div></div><!-- fragment --></li>
</ul>
<h3><a class="anchor" id="group_system_config_heap_stack_config_iar"></a>
IAR</h3>
<ul>
<li><b>Editing source code files</b><br />
 The heap and stack sizes are defined in the linker script files: 'xx_yy.icf', where 'xx' is the device family, and 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.icf and cy8c6xx7_cm4_dual.icf. Change the heap and stack sizes by modifying the following lines:<br />
<div class="fragment"><div class="line">Stack_Size      EQU     0x00001000 </div></div><!-- fragment --> <div class="fragment"><div class="line">Heap_Size       EQU     0x00000400 </div></div><!-- fragment --></li>
<li><b>Specifying via command line</b><br />
 Change the heap and stack sizes passing the following commands to the linker (including quotation marks):<br />
<div class="fragment"><div class="line">--define_symbol __STACK_SIZE=0x000000400 </div></div><!-- fragment --> <div class="fragment"><div class="line">--define_symbol __HEAP_SIZE=0x000000100 </div></div><!-- fragment --></li>
</ul>
<h2><a class="anchor" id="group_system_config_default_handlers"></a>
Default Interrupt Handlers Definition</h2>
<p>The default interrupt handler functions are defined as weak functions to a dummy handler in the startup file. The naming convention for the interrupt handler names is &lt;interrupt_name&gt;_IRQHandler. A default interrupt handler can be overwritten in user code by defining the handler function using the same name. For example: </p><div class="fragment"><div class="line"> <span class="keywordtype">void</span> scb_0_interrupt_IRQHandler(<span class="keywordtype">void</span>)</div><div class="line">{</div><div class="line">    ...</div><div class="line">}</div></div><!-- fragment --><h2><a class="anchor" id="group_system_config_device_vector_table"></a>
Vectors Table Copy from Flash to RAM</h2>
<p>This process uses memory sections defined in the linker script. The startup code actually defines the contents of the vector table and performs the copy. </p>
<h3><a class="anchor" id="group_system_config_device_vector_table_gcc"></a>
ARM GCC</h3>
<p>The linker script file is 'xx_yy.ld', where 'xx' is the device family, and 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.ld and cy8c6xx7_cm4_dual.ld. It defines sections and locations in memory.<br />
 Copy interrupt vectors from flash to RAM: <br />
 From:</p><div class="fragment"><div class="line">LONG (<a class="code" href="group__group__sysint__globals.html#ga0b785674909134a8a4045949824befc8">__Vectors</a>) </div></div><!-- fragment --><p> To:</p><div class="fragment"><div class="line">LONG (__ram_vectors_start__) </div></div><!-- fragment --><p> Size:</p><div class="fragment"><div class="line">LONG (__Vectors_End - <a class="code" href="group__group__sysint__globals.html#ga0b785674909134a8a4045949824befc8">__Vectors</a>) </div></div><!-- fragment --><p> The vector table address (and the vector table itself) are defined in the assembler startup files (e.g. startup_psoc6_01_cm0plus.S and startup_psoc6_01_cm4.S). The code in these files copies the vector table from Flash to RAM. </p>
<h3><a class="anchor" id="group_system_config_device_vector_table_mdk"></a>
ARM Compiler</h3>
<p>The linker script file is 'xx_yy.sct', where 'xx' is the device family, and 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.sct and cy8c6xx7_cm4_dual.sct. The linker script specifies that the vector table (RESET_RAM) shall be first in the RAM section.<br />
 RESET_RAM represents the vector table. It is defined in the assembler startup files (e.g. startup_psoc6_01_cm0plus.s and startup_psoc6_01_cm4.s). The code in these files copies the vector table from Flash to RAM.</p>
<h3><a class="anchor" id="group_system_config_device_vector_table_iar"></a>
IAR</h3>
<p>The linker script file is 'xx_yy.icf', where 'xx' is the device family, and 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.icf and cy8c6xx7_cm4_dual.icf. This file defines the .intvec_ram section and its location. </p><div class="fragment"><div class="line">place at start of IRAM1_region  { readwrite section .intvec_ram}; </div></div><!-- fragment --><p> The vector table address (and the vector table itself) are defined in the assembler startup files (e.g. startup_psoc6_01_cm0plus.s and startup_psoc6_01_cm4.s). The code in these files copies the vector table from Flash to RAM.</p>
<h1><a class="anchor" id="group_system_config_MISRA"></a>
MISRA Compliance</h1>
<table class="doxtable">
<tr>
<th>MISRA Rule </th><th>Rule Class (Required/Advisory) </th><th>Rule Description </th><th>Description of Deviation(s)  </th></tr>
<tr>
<td>2.3 </td><td>R </td><td>The character sequence // shall not be used within a comment. </td><td>The comments provide a useful WEB link to the documentation.  </td></tr>
</table>
<h1><a class="anchor" id="group_system_config_changelog"></a>
Changelog</h1>
<table class="doxtable">
<tr>
<th>Version </th><th>Changes </th><th>Reason for Change  </th></tr>
<tr>
<td rowspan="1">2.100 </td><td>Added support for TRAVEO&trade; II Body Entry devices. </td><td>Code enhancement and support for new devices.  </td></tr>
<tr>
<td rowspan="1">2.95.1 </td><td>Restructured documentation. </td><td>Documentation update.  </td></tr>
<tr>
<td rowspan="1">2.95 </td><td>Update FPU enable function with CMSIS macros to disable/enable interrupts </td><td>Move to standard inline CMSIS ARM macros  </td></tr>
<tr>
<td rowspan="2">2.91 </td><td>Updated memory configuration for PSoC 64 devices. </td><td>Flash and RAM memory allocation updated.  </td></tr>
<tr>
<td>Added cys06xxa_cm4 linker scripts. </td><td>New device support.  </td></tr>
<tr>
<td rowspan="4">2.90.1 </td><td>Updated <a class="el" href="group__group__system__config__cm4.html#group_system_config_heap_stack_config_gcc">ARM GCC</a> section with the note on the dynamic memory allocation for ARM GCC. </td><td>Documentation update.  </td></tr>
<tr>
<td>Updated system_psoc6.h to include custom CY_SYSTEM_PSOC6_CONFIG passed as compiler macro. </td><td>Improve configuration flexibility.  </td></tr>
<tr>
<td>Updated attribute usage for the linker section placement in CM0+ startup code </td><td>Enhancement based on usability feedback.  </td></tr>
<tr>
<td>Renamed the '.cy_xip' linker script region as 'cy_xip' </td><td>Enable access to the XIP region start/end addresses from the C code.  </td></tr>
<tr>
<td>2.90 </td><td>Updated linker scripts for PSoC 64 Secure MCU cyb06xx7 devices. </td><td>Flash allocation adjustment.  </td></tr>
<tr>
<td rowspan="2">2.80 </td><td>Updated linker scripts for PSoC 64 Secure MCU devices. </td><td>Updated FLASH and SRAM memory area definitions in cyb0xxx linker script templates in accordance with the PSoC 64 Secure Boot SDK policies.  </td></tr>
<tr>
<td>Added <a class="el" href="group__group__pra__functions.html#ga93393c7e6e2ca124ac0b331dcee6e78b">Cy_PRA_Init()</a> call to <a class="el" href="group__group__startup__config__system__functions.html#ga93f514700ccf00d08dbdcff7f1224eb2">SystemInit()</a> Cortex-M0+ and Cortex-M4 functions for PSoC 64 Secure MCU. </td><td>Updated PSoC 64 Secure MCU startup sequence to initialize the Protected Register Access driver.  </td></tr>
<tr>
<td>2.70.1 </td><td>Updated documentation for the better description of the existing startup implementation. </td><td>User experience enhancement.  </td></tr>
<tr>
<td rowspan="5">2.70 </td><td>Updated <a class="el" href="group__group__startup__config__system__functions.html#gae0c36a9591fe6e9c45ecb21a794f0f0f">SystemCoreClockUpdate()</a> implementation - The SysClk API is reused. </td><td>Code optimization.  </td></tr>
<tr>
<td>Updated <a class="el" href="group__group__startup__config__system__functions.html#ga93f514700ccf00d08dbdcff7f1224eb2">SystemInit()</a> implementation - The IPC7 structure is initialized for both cores. </td><td>Provided support for SysPM driver updates.  </td></tr>
<tr>
<td>Updated the linker scripts. </td><td>Reserved FLASH area for the MCU boot headers.  </td></tr>
<tr>
<td>Added System Pipe initialization for all devices.  </td><td>Improved PDL usability according to user experience.  </td></tr>
<tr>
<td>Removed redundant legacy macros: CY_CLK_EXT_FREQ_HZ, CY_CLK_ECO_FREQ_HZ and CY_CLK_ALTHF_FREQ_HZ. Use <a class="el" href="group__group__sysclk__ext__funcs.html#gad4b77c61d47878007b5c50e3baf13e51">Cy_SysClk_ExtClkSetFrequency</a>, <a class="el" href="group__group__sysclk__eco__funcs.html#ga9d94ac55503404a0bdaf017fe33ecdbd">Cy_SysClk_EcoConfigure</a> and <a class="el" href="group__group__ble__clk__functions.html#gae92f61cd532c63d9547c52ccd6757ff7">Cy_BLE_EcoConfigure</a> functions instead them.  </td><td>Defect fixing.  </td></tr>
<tr>
<td>2.60 </td><td>Updated linker scripts. </td><td>Provided support for new devices, updated usage of CM0p prebuilt image.  </td></tr>
<tr>
<td>2.50 </td><td>Updated assembler files, C files, linker scripts. </td><td>Dynamic allocated HEAP size for Arm Compiler 6, IAR 8.  </td></tr>
<tr>
<td>2.40 </td><td>Updated assembler files, C files, linker scripts. </td><td>Added Arm Compiler 6 support.  </td></tr>
<tr>
<td rowspan="2">2.30 </td><td>Added assembler files, linker scripts for Mbed OS. </td><td>Added Arm Mbed OS embedded operating system support.  </td></tr>
<tr>
<td>Updated linker scripts to extend the Flash and Ram memories size available for the CM4 core. </td><td>Enhanced PDL usability.  </td></tr>
<tr>
<td>2.20 </td><td>Moved the Cy_IPC_SystemSemaInit(), Cy_IPC_SystemPipeInit() functions implementation from IPC to Startup. </td><td>Changed the IPC driver configuration method from compile time to run time.  </td></tr>
<tr>
<td rowspan="2">2.10 </td><td>Added constructor attribute to <a class="el" href="group__group__startup__config__system__functions.html#ga93f514700ccf00d08dbdcff7f1224eb2" title="For CAT1A: ">SystemInit()</a> function declaration for ARM MDK compiler. <br />
 Removed $Sub$$main symbol for ARM MDK compiler.  </td><td>uVision Debugger support.  </td></tr>
<tr>
<td>Updated description of the Startup behavior for Single-Core Devices. <br />
 Added note about WDT disabling by <a class="el" href="group__group__startup__config__system__functions.html#ga93f514700ccf00d08dbdcff7f1224eb2" title="For CAT1A: ">SystemInit()</a> function.  </td><td>Documentation improvement.  </td></tr>
<tr>
<td rowspan="4">2.0 </td><td>Added restoring of FLL registers to the default state in <a class="el" href="group__group__startup__config__system__functions.html#ga93f514700ccf00d08dbdcff7f1224eb2" title="For CAT1A: ">SystemInit()</a> API for single core devices. Single core device support.  </td><td></td></tr>
<tr>
<td>Added Normal Access Restrictions, Public Key, TOC part2 and TOC part2 copy to Supervisory flash linker memory regions. <br />
 Renamed 'wflash' memory region to 'em_eeprom'.  </td><td>Linker scripts usability improvement.  </td></tr>
<tr>
<td>Added Cy_IPC_SystemSemaInit(), Cy_IPC_SystemPipeInit(), <a class="el" href="group__group__flash__functions.html#gaf1b44a029169a1baa08e211bff714a19" title="Initiates all needed prerequisites to support flash erase/write. ">Cy_Flash_Init()</a> functions call to <a class="el" href="group__group__startup__config__system__functions.html#ga93f514700ccf00d08dbdcff7f1224eb2" title="For CAT1A: ">SystemInit()</a> API. </td><td>Reserved system resources for internal operations.  </td></tr>
<tr>
<td>Added clearing and releasing of IPC structure #7 (reserved for the Deep-Sleep operations) to <a class="el" href="group__group__startup__config__system__functions.html#ga93f514700ccf00d08dbdcff7f1224eb2" title="For CAT1A: ">SystemInit()</a> API. </td><td>To avoid deadlocks in case of SW or WDT reset during Deep-Sleep entering.  </td></tr>
<tr>
<td>1.0 </td><td>Initial version </td><td></td></tr>
</table>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
API Reference</h2></td></tr>
<tr class="memitem:group__group__system__config__macro"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__system__config__macro.html">Macros</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__system__config__functions"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__system__config__functions.html">Functions</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__system__config__globals"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__system__config__globals.html">Global Variables</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
